//
// Created by cheng on 2021/02/25.
//

#ifndef ALDS_BITREE_H
#define ALDS_BITREE_H
#include <iostream>
#include <queue>


typedef struct Node {
    int key;
    Node *lChild, *rChild;

    Node() {
        key = -1;
        lChild = rChild = nullptr;
    }
    Node(int key) {
        this->key = key;
        lChild = rChild = nullptr;
    }

}* BinaryTree, Node;

void PreOrder_Recursion(BinaryTree &t);
void InOrder_Recursion(BinaryTree &t);
void PostOrder_Recursion(BinaryTree& t);

void insert(int key, BinaryTree& tree);

bool Find(int key, BinaryTree& tree);

void Delete(BinaryTree& tree, Node* node);

Node *getSuccessor(Node *pNode);


#endif //ALDS_BITREE_H
